﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Titler.Controls
{
    /// <summary>
    /// Interaction logic for UserControl3.xaml
    /// </summary>
    public partial class GaugeCtrl : UserControl
    {

        public GaugeCtrl()
        {
            InitializeComponent();
        }

        /// <summary>
        /// ADD NEW ITEM TO CONTROL LIST
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Control_Add_Item(object sender, RoutedEventArgs e)
        {
            ControlMethods.Control_Add_Item(sender);
        }


        public string[] TitleReturn(bool Dwg, int Level)
        {
            string[] returnTitle = new string[2];

            returnTitle[0] = Config.Text + " " + GaugeFamily.Text + " " +
                (GaugeFamily.Text == "SMARTLOG" ? "GAUGE" : GaugeDiameter.Text + " OD") +
                (GaugeDTDR.Text == "DUAL TRANSDUCER" ? ", DUAL TRANSDUCERS" : GaugeDTDR.Text == "DUAL REDUNDANT" ? ", DUAL REDUNDANT" : "") +
                (Feedthru.Text == "YES" ? ", FEEDTHROUGH" : "") +
                (Dwg == false && Level == 3 ? ", " + GaugePressure.Text + "K " + GaugeTemp.Text + "C" : "");

            returnTitle[1] = (GaugeSeal.Text == "DUAL METAL SEAL" && Level == 3) ? "DUAL METAL SEAL CABLE TERMINATION" :
                (GaugeSeal.Text == "SINGLE METAL SEAL" && Level == 3 && Dwg == false) ? "SINGLE METAL SEAL CABLE TERMINATION" : "";

            return returnTitle;
        }
    }
}
